package com.personal.system.service.test;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.personal.system.domain.test.TcGasSaleQuotation;
import com.personal.system.mapper.test.TcGasSaleQuotationMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

@Service
public class TcGasSaleQuotationServiceImpl extends ServiceImpl<TcGasSaleQuotationMapper, TcGasSaleQuotation> implements TcGasSaleQuotationService {

    @Resource
    private TcGasSaleQuotationMapper tcGasSaleQuotationMapper;

    /**
     * 查询客户报价信息
     *
     * @param quoteId 客户报价信息ID
     * @return 客户报价信息
     */
    @Override
    public TcGasSaleQuotation selectTcGasSaleQuotationById(Long quoteId) {
        return tcGasSaleQuotationMapper.selectTcGasSaleQuotationById(quoteId);
    }

    /**
     * 查询客户报价信息列表
     *
     * @param tcGasSaleQuotation 客户报价信息
     * @return 客户报价信息
     */
    @Override
    public List<TcGasSaleQuotation> selectTcGasSaleQuotationList(TcGasSaleQuotation tcGasSaleQuotation) {
        return tcGasSaleQuotationMapper.selectTcGasSaleQuotationList(tcGasSaleQuotation);
    }

    /**
     * 新增客户报价信息
     *
     * @param tcGasSaleQuotation 客户报价信息
     * @return 结果
     */
    @Override
    public int insertTcGasSaleQuotation(TcGasSaleQuotation tcGasSaleQuotation) {
        tcGasSaleQuotation.setCreateTime(new Date());
        return tcGasSaleQuotationMapper.insertTcGasSaleQuotation(tcGasSaleQuotation);
    }

    /**
     * 修改客户报价信息
     *
     * @param tcGasSaleQuotation 客户报价信息
     * @return 结果
     */
    @Override
    public int updateTcGasSaleQuotation(TcGasSaleQuotation tcGasSaleQuotation) {
        tcGasSaleQuotation.setUpdateTime(new Date());
        return tcGasSaleQuotationMapper.updateTcGasSaleQuotation(tcGasSaleQuotation);
    }

    /**
     * 批量删除客户报价信息
     *
     * @param quoteIds 需要删除的客户报价信息ID
     * @return 结果
     */
    @Override
    public int deleteTcGasSaleQuotationByIds(Long[] quoteIds) {
        return tcGasSaleQuotationMapper.deleteTcGasSaleQuotationByIds(quoteIds);
    }

    /**
     * 删除客户报价信息信息
     *
     * @param quoteId 客户报价信息ID
     * @return 结果
     */
    @Override
    public int deleteTcGasSaleQuotationById(Long quoteId) {
        return tcGasSaleQuotationMapper.deleteTcGasSaleQuotationById(quoteId);
    }
}